<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Search</title>
<link href="resources/css/bootstrap.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="resources/css/jquery-ui-1.10.4.css" />
<link href="resources/css/publications.css?lmts=2014-08-12-78-24-13"	rel="stylesheet" type="text/css">
 <link rel="stylesheet" type="text/css" href="resources/css/jquery-ui.css"/>
</head>
<body>
<!-- Container -->
  <div class="container" style="border:1px solid #eeeeee;">
 
 <div class="" style="height: 100px;text-align: left: ;">
  <table width="300px"> <tr> <td> <div><a href="#" onclick="showCategories('managePostage','invetory');"><b>Manage Postage labels</b></a></div>    </td> <td> <div><a href="#" onclick="showCategories('invetory','managePostage');"><b>Inventory</b></a></div>    </td> </tr> </table>
 </div>
		<div style="clear: both;"></div>
		<div class="col-xs-12 companyExecBoxShadow marginTop25" style="padding-right: 0px; padding-left: 0px;">
		<div class="reportpagntn">			</div>
			<div class="col-xs-3" style="min-height: 300px;max-height: 1000px;padding-left: 0px "> 
				<div style="padding-left: 19px;">
					<div class="block">
						<h4 class="title-divider"><span>Categories</span></h4>
						<div class="list-group hide" style="padding-left: 10px;" id="managePostage">
							<div>Manage Postage labels</div>
							<div style="padding-left: 12px;">
								<a onclick="shomMenuContent('upload')">Upload</a><br/>
								<a onclick="shomMenuContent('generateLabels')">Generate labels</a>
							</div>
					   </div>
					   <div class="list-group hide" style="padding-left: 10px;" id="invetory">
							<div>Inventory</div>
							<div style="padding-left: 12px;">
								<a onclick="shomMenuContent('addItem')">Add</a><br/>
								<a onclick="shomMenuContent('editItem')">Edit</a><br/>
								<a onclick="shomMenuContent('searchItem')">Search</a><br/>
								<a onclick="addItems();">SaveFromTxtFileToDB</a>
							</div>
					   </div>
					</div>
				</div>
			</div>
			<div class="col-xs-9" style="padding-right: 0px; padding-left: 0px;border-left: 1px solid #e2e2e2;min-height: 300px;">
			  <div id="manageContent" style="text-align: center;padding-top: 50px;" class="hide">
					<table align="center">
					         <tr>
								<td><div id="uploadstatus"></div></td>
							</tr>
						<tr>
							<td><input type="file" name="uploadFile" id="uploadFile" /></td>
						</tr>
						<tr>
							<td><button style="padding: 2px 8px;" class="btn btn-primary" type="submit" onclick="uploadFiles();"> Upload </button></td>
						</tr>
					</table>
				</div>
				<div id="generateLabels" style="text-align: center;padding-top: 50px;" class="hide">
				
						<table style="width: 80%" class="table table-striped"
							align="center">
							<thead>
								<th style="text-align: center;">Item no</th>
								<th style="text-align: center;">File name</th>
							</thead> 
							<tbody id="searchBody">
							</tbody>
						</table>
				
				</div>
				<div id="inventoryContent" style="text-align: center;padding-top: 50px;" class="hide">
					<div class="addItem hide">
						<input type="hidden" id="itemId">
						<table align="center">
							<tr>
								<td colspan="2"><div id="errorMsg"></div></td>
							</tr>
							<tr>
								<td><label>Item name:</label></td> <td><input type="textbox" name="itemName" id ="itemName"></td>
							</tr>
							<tr>
								<td><label>Item code: </label></td> <td> <input type="textbox" name="itemCode" id="itemCode"></td>
							</tr>
							<tr>
								<td colspan="2"> <div><button style="padding: 2px 8px;" id="itemBtn" class="btn btn-primary" type="submit" onclick="addItem();"> Add Item </button></div></td>
							</tr>
						</table>
					</div>
					<div class="editItem hide">
						<table style="width: 80%" class="table table-striped"
							align="center">
							<thead>
								<th style="text-align: center;">Item no</th>
								<th style="text-align: center;">Item name</th>
								<th style="text-align: center;">Item code</th>
								<th></th>
							</thead>
							<tbody id="reportResultsBody">
							</tbody>
						</table>
					</div>
					<div class="searchItem hide">
						<div><input type="text" id="searchItemtxt"> <button style="padding: 2px 8px;" id="searchitemBtn" class="btn btn-primary" type="submit" onclick="searchItemsData();"> Search</button></div>
						<table style="width: 80%" class="table table-striped"
							align="center">
							<thead>
								<th style="text-align: center;">Item no</th>
								<th style="text-align: center;">Item name</th>
								<th style="text-align: center;">Item code</th>
							</thead> 
							<tbody id="searchBody">
							</tbody>
						</table>
					</div>
				</div>
				
			</div>
		</div>	
	</div>
 
  <script type="text/javascript" src="resources/js/jquery.js"></script>
    <script type="text/javascript" src="resources/js/prototype.js"></script>
    <script type="text/javascript" src="resources/js/bootstrap.js"></script>
	<script type="text/javascript" src="resources/js/common.js" ></script>
    <script type="text/javascript" src="resources/js/controller.js?lmts=2013-05-01-14:40" ></script>
    <script type="text/javascript" src="resources/js/searchResults.js"></script>
   
</body>
</html>